<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        {{msg}}
        
    </div>
</body>
</html>
<script>
    new Vue({
        el:'#app',
        data:{
            msg:'hello Vue'
        },
        methods: {
            show(){
                alert('方法调用')
            }
        },
        beforeCreate(){
            console.log('beforeCreate')
            console.log('当前msg的值是'+this.msg)
            this.show()
        },
        created(){
            console.log('created')
            console.log('当前msg的值是'+this.msg)

        },
        // beforeMount(){
        //     console.log('beforeMount')
        // },
        // mounted(){
        //     console.log('mounted')
        // },
        // beforeUpdate(){
        //     console.log('beforeUpdate')
        // },
    })
</script>